<?php
include_once '../../Model/M_Producto.php';
$productos = new M_Producto();
$idsubrubro = $_REQUEST['codigo'];
$lista = $productos->searchProductosxSubRubro($idsubrubro);

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>
<head>
    <style>
        .prod_img{
            width: 120px;
            height: 80px;
            float: left;
        }
        .prod_des{
            width: 170px;
            height: 80px;
            float: left;
            text-align: left;
            padding-left: 3px;
        }
        .prod_des label{
            font-size: 12px            
        } 
        .prod_des spam{
            font-size: 10px;
        }
        #producto{
            width: 355px;
            height: 90px;            
            float: left;
                
                background: rgb(226,226,226); /* Old browsers */
                background: -moz-linear-gradient(top,  rgba(226,226,226,1) 0%, rgba(219,219,219,1) 50%, rgba(209,209,209,1) 51%, rgba(254,254,254,1) 100%); /* FF3.6+ */
                background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(226,226,226,1)), color-stop(50%,rgba(219,219,219,1)), color-stop(51%,rgba(209,209,209,1)), color-stop(100%,rgba(254,254,254,1))); /* Chrome,Safari4+ */
                background: -webkit-linear-gradient(top,  rgba(226,226,226,1) 0%,rgba(219,219,219,1) 50%,rgba(209,209,209,1) 51%,rgba(254,254,254,1) 100%); /* Chrome10+,Safari5.1+ */
                background: -o-linear-gradient(top,  rgba(226,226,226,1) 0%,rgba(219,219,219,1) 50%,rgba(209,209,209,1) 51%,rgba(254,254,254,1) 100%); /* Opera 11.10+ */
                background: -ms-linear-gradient(top,  rgba(226,226,226,1) 0%,rgba(219,219,219,1) 50%,rgba(209,209,209,1) 51%,rgba(254,254,254,1) 100%); /* IE10+ */
                background: linear-gradient(to bottom,  rgba(226,226,226,1) 0%,rgba(219,219,219,1) 50%,rgba(209,209,209,1) 51%,rgba(254,254,254,1) 100%); /* W3C */
                filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e2e2e2', endColorstr='#fefefe',GradientType=0 ); /* IE6-9 */
                margin: 2px;
                padding: 3px;
                margin-top: 7px;
                text-align: center;
                font-size: 8px;
                font-weight: bold;
        }
</style>
</head>
<body>
    <? for($i=0; $i<count($lista); $i++){ ?>
    <div id="producto">            
    <div class="prod_img">
        <img height="80" width="120" src="../images/Producto/<? echo $lista[$i]['imagen'];?>"/>
    </div>                   
    <div class="prod_des">
       <label><? echo $lista[$i]['nombre'];?></label><br/>
       <span><? $desc = $lista[$i]['descripcion']; if($desc){echo $desc;} else{?>Descripcion del plato.</span><?}?><br/>
       <span>Precio: </span><br/><label style="color: blue;"> S/.<? echo $lista[$i]['precio_fijo'];?></label><br/>
    </div>
    <div style="clear: both;"></div>
    </div>
    <?}?>
</body>